<!DOCTYPE html>
<html>
<head>
<title>${context.getContextName()}</title>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
${Styles.src(zhiqim.css)}
${Scripts.src(zhiqim.js)}
${Scripts.setContextPath(context)}
${Styles.src(zmr_theme.css)}
${Scripts.src(zmr_theme.js)}
${zhiqim_manager_console_log()}
</head>

<body>
${Htmls.toCallFrame()}
<!--顶部导航 -->
<div class="topnav">
    <div id="logo" class="logo z-pointer z-text-left ${sessionUser.getSidebarClass()}" onclick="Z.L.href('${context.getRootPath("/"+zhiqim_manager+"/main.htm")}');">${context.getAttribute("name")}</div>
    <div class="topnavleft">
        <div class="bar z-w60 z-text-center z-pointer" onclick="Zmr.sidebar();"><i class="z-font z-list z-px22"></i></div>
        ${zhiqim_manager_topnav_left_defined()}
    </div>
    <div class="topnavright">
        ${zhiqim_manager_topnav_right_defined()}
        <div class="nav z-w100 z-text-center z-pointer" onclick="Z.L.reload();">刷新</div>
        <div class="nav z-w100 z-text-center z-pointer" onclick="Z.L.confirm('${context.getRootPath("/"+zhiqim_manager+"/logout.htm")}', '确实要退出吗?');">退出系统</div>
    </div>
</div>

<!--容器开始 -->
<div class="container">

<!--边导航开始-->
<div id="sidebar" class="${sessionUser.getSidebarClass()}">
<!--顶导航-->
<#var topMenuCode = sessionUser.getSelectedTopMenuCode(request, designatedPath)/>
<ul class="sidebar-top">
    <li class="avatar<#if topMenuCode == null> active</#if>" onclick="Z.L.href('${context.getRootPath("/"+zhiqim_manager+"/profile.htm")}');"><img class="z-bd-rd50p z-w40 z-h40" src="${sessionUser.getAvatar50()}"></li>
<#for topMenu : sessionUser.getTopMenuList()>
<#var childMenuFirst = sessionUser.getChildMenuFirst(topMenu.getMenuCode())/>
<#if childMenuFirst != null || Validates.isNotEmptyBlank(topMenu.getMenuUrl())>
    <li onclick="Z.L.href('${context.getRootPath(childMenuFirst==null?topMenu.getMenuUrl():childMenuFirst.getMenuUrl())}');" <#if topMenu.getMenuCode() == topMenuCode>class="active"</#if>><i class="z-font ${topMenu.getMenuIcon()}"></i><br>#{topMenu.getMenuNameAbbr()}</li>
</#if>
</#for>
</ul>
<#var childMenuCode = sessionUser.getSelectedSecondMenuCode(request, designatedPath)/>
<#if childMenuCode != null && topMenuCode != null>
<#var topMenu = sessionUser.getMenu(topMenuCode)/>
<#if sessionUser.hasChildMenu(topMenu.getMenuCode())>
<!--子导航-->
<div class="sidebar-child">
    <div class="info z-float-left z-text-left z-bd-b" >
        <span class="z-relative z-px18 z-bold" style="line-height:32px;"><i class="z-font ${topMenu.getMenuIcon()}"></i><span class="z-mg-l10">#{topMenu.getMenuName()}</span></span><br>
    </div>
    <ul>
    <#for childMenu : sessionUser.getChildMenuList(topMenu.getMenuCode())>
        <li onclick="Z.L.href('${context.getRootPath(childMenu.getMenuUrl())}');" class="<#if childMenu.getMenuCode() == childMenuCode> active</#if>"><i class="z-font z-px16 ${childMenu.getMenuIcon()}"></i><span class="z-mg-l5">#{childMenu.getMenuName()}</span></p>
    </#for>
    </ul>
</div>
</#if>
</#if>
<!--边导航结束-->
</div>

<!--主体-->
<#var mainbodyLeft = 260/>
<#if topMenuCode == null || !sessionUser.hasChildMenu(topMenuCode)>
    <#var mainbodyLeft = 60/>
</#if>
<#if !sessionUser.hasSidebar()>
<div id="mainbody" class="mainbody" value="${mainbodyLeft}" style="margin-left:0;">
<#elseif topMenuCode == null || !sessionUser.hasChildMenu(topMenuCode)>
<div id="mainbody" class="mainbody" value="${mainbodyLeft}" style="margin-left:60px;">
<#else>
<div id="mainbody" class="mainbody" value="${mainbodyLeft}">
</#if>
    <#include include/>
</div>

<!--容器结束 -->
</div>
</body>
</html>